<template>
	<view class="paySuccess">
     <CustomNavbar title="payment successful" color="#fff" bg="#241e42"></CustomNavbar>
		<image src="../../static/images/pay-success.png" class="paySuccessIcon"></image>
    <view class="paySuccessAmount">${{info.amount}}</view>
    <view class="paySuccessBody">
      <view class="paySuccessBodyItem">
        <view class="left">Payment method</view>
        <view class="left">ApplePay</view>
      </view>
      <view class="paySuccessBodyItem">
        <view class="left">Payment number</view>
        <view class="left">{{info.order_no}}</view>
      </view>
    </view>
    <view class="paySuccessBtn" @click="handleClick">complete</view>
	</view>
</template>

<script>
	export default {
		data() {
			return { info:{} }
		},
    computed: {
      payType() {
        return { 'weixin_wap': '微信支付', 'alipay_wap':'支付宝支付' }
      }
    },
    onLoad(options){
      this.info = options
    },
		methods: {
      handleClick(){
        uni.navigateBack()
      }
		}
	}
</script>

<style lang="scss" scoped>
.paySuccess{
  padding: 64rpx 35rpx 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  .paySuccessIcon{
    width: 275rpx;
    height: 228rpx;
  }
  .paySuccessAmount{
    margin-top: 30rpx;
    font-size: 46rpx;
    font-family: DINPro, DINPro;
    font-weight: 500;
    color: #FFFFFF;
  }
  .paySuccessBody{
    width: 100%;
    margin-top: 80rpx;
    border-top: 2rpx dashed rgba(255, 255, 255, 0.2);
    .paySuccessBodyItem{
      display: flex;
      justify-content: space-between;
      margin-top: 40rpx;
      font-size: 28rpx;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      color: #FFFFFF;
      &:first-of-type{
        margin-top: 69rpx;
      }
    }
  }
  .paySuccessBtn{
    width: 100%;
    height: 98rpx;
    background: linear-gradient(90deg, #A608C5 0%, #03F8FF 100%);
    border-radius: 49rpx;
    margin-top: 240rpx;
    font-size: 34rpx;
    font-family: PingFangSC, PingFang SC;
    font-weight: 400;
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}
</style>
